<?php
/**
 * 用户注册表单验证类
 */

namespace App\Http\Requests\Api;


class UserRequest extends FormRequest
{
    /**
     * 校验规则
     */
    public function rules()
    {
        return [
            'name' => 'required|string|max:255',
            'password' => 'required|string|min:6',
            'verification_key' => 'required|string',
            'verification_code' => 'required|string',
        ];
    }

    /**
     * 属性
     */
    public function attributes()
    {
        return [
            'verification_key' => '短信验证码 key',
            'verification_code' => '短信验证码',
        ];
    }
}
